package main.parsers.utils;

import java.sql.ResultSet;
import java.sql.SQLException;

public class Standing 
{
	private String club;
	private int games;
	private int won;
	private int wonovertime;
	private int wonbullets;
	private int lostbullets;
	private int lostovertime;
	private int lost;
	private int goals;
	private int misses;
	private int points;
	
	public Standing(String club, int games, int won, int wonovertime, int wonbullets, int lostbullets, int lostovertime, int lost, int goals, int misses, int points)
	{
		this.club = club;
		this.games = games;
		this.won = won;
		this.wonovertime = wonovertime;
		this.wonbullets = wonbullets;
		this.lostbullets = lostbullets;
		this.lostovertime = lostovertime;
		this.lost = lost;
		this.goals = goals;
		this.misses = misses;
		this.points = points;
	}

	public String getClub() {
		return club;
	}

	public int getGames() {
		return games;
	}

	public int getWon() {
		return won;
	}

	public int getWonovertime() {
		return wonovertime;
	}

	public int getWonbullets() {
		return wonbullets;
	}

	public int getLostbullets() {
		return lostbullets;
	}

	public int getLostovertime() {
		return lostovertime;
	}

	public int getLost() {
		return lost;
	}

	public int getGoals() {
		return goals;
	}

	public int getMisses() {
		return misses;
	}

	public int getPoints() {
		return points;
	}
	
	public static Standing get(ResultSet rs) throws SQLException
	{
		return new Standing(rs.getString("club"), rs.getInt("games"), rs.getInt("won"), rs.getInt("wonovertime"), rs.getInt("wonbullets"), rs.getInt("lostbullets"), 
							rs.getInt("lostovertime"), rs.getInt("lost"), rs.getInt("goals"), rs.getInt("misses"), rs.getInt("points"));
	}
}
